<template>
  <div>
    子组件, {{ abc }}，
    <button @click="hClick">num+1</button>
    <button @click="$emit('update:age', age+1)">age+1</button>
  </div>
</template>

<script>
export default {
  props: {
    abc: {
      type: Number,
      required: true
    },
    age: {
      type: Number,
      required: true
    }
  },
  methods: {
    hClick() {
      // this.value = this.value + 1
      this.$emit('update:abc', this.abc + 1)
    }
  }
}
</script>
